package cn.hsw.platform.core.doc.configure;

import cn.hsw.platform.core.doc.service.AuthReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;

/**
 * 项目启动后获取接口信息 并存储至redis
 * @author 李子木
 * @date 2020-11-03
 */
@Configuration
public class ApiServiceConfigurer{

    @Autowired
    AuthReportService authReportService;

    @EventListener(ApplicationReadyEvent.class)
    public void init(){
        authReportService.getApiInfo();
    }
}
